class BindPointModel {
  String? area;
  int? areaId;
  int? bindFlag;
  int? bindId;
  String? bindTime;
  double? coverRatio;
  int? deviceId;
  DeviceStatus? deviceStatus;
  int? deviceType;
  String? deviceTypeStr;
  int? id;
  int? pointX;
  int? pointY;
  int? x;
  int? y;

  BindPointModel(
      {this.area,
        this.areaId,
        this.bindFlag,
        this.bindId,
        this.bindTime,
        this.coverRatio,
        this.deviceId,
        this.deviceStatus,
        this.deviceType,
        this.deviceTypeStr,
        this.id,
        this.pointX,
        this.pointY,
        this.x,
        this.y
      });

  BindPointModel.fromJson(Map<String, dynamic> json) {
    area = json['area'];
    areaId = json['areaId'];
    bindFlag = json['bindFlag'];
    bindId = json['bindId'];
    bindTime = json['bindTime'];
    coverRatio = json['coverRatio'];
    deviceId = json['deviceId'];
    deviceStatus = json['deviceStatus'] != null
        ? new DeviceStatus.fromJson(json['deviceStatus'])
        : null;
    deviceType = json['deviceType'];
    deviceTypeStr = json['deviceTypeStr'];
    id = json['id'];
    pointX = json['pointX'];
    pointY = json['pointY'];
    x = pointX;
    y = pointY;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['area'] = this.area;
    data['areaId'] = this.areaId;
    data['bindFlag'] = this.bindFlag;
    data['bindId'] = this.bindId;
    data['bindTime'] = this.bindTime;
    data['coverRatio'] = this.coverRatio;
    data['deviceId'] = this.deviceId;
    if (this.deviceStatus != null) {
      data['deviceStatus'] = this.deviceStatus!.toJson();
    }
    data['deviceType'] = this.deviceType;
    data['deviceTypeStr'] = this.deviceTypeStr;
    data['id'] = this.id;
    data['pointX'] = this.pointX;
    data['pointY'] = this.pointY;
    return data;
  }
}

class DeviceStatus {
  int? deviceId;
  int? deviceStatus;
  String? deviceStatusStr;
  String? heartbeatTime;
  int? id;
  String? sendDataTime;

  DeviceStatus(
      {this.deviceId,
        this.deviceStatus,
        this.deviceStatusStr,
        this.heartbeatTime,
        this.id,
        this.sendDataTime});

  DeviceStatus.fromJson(Map<String, dynamic> json) {
    deviceId = json['deviceId'];
    deviceStatus = json['deviceStatus'];
    deviceStatusStr = json['deviceStatusStr'];
    heartbeatTime = json['heartbeatTime'];
    id = json['id'];
    sendDataTime = json['sendDataTime'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['deviceId'] = this.deviceId;
    data['deviceStatus'] = this.deviceStatus;
    data['deviceStatusStr'] = this.deviceStatusStr;
    data['heartbeatTime'] = this.heartbeatTime;
    data['id'] = this.id;
    data['sendDataTime'] = this.sendDataTime;
    return data;
  }
}

